package com.ddxz.hospital.util;

import com.ddxz.tool.core.common.DdxzStatus;

/**
 * class description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/9/24
 */

public enum  ErrorStatus implements DdxzStatus {
    PASSWORD_NOT_MATCH(1001, "用户名密码不匹配"),
    INVALID_TOKEN(1002, "无效的令牌，请重新登录"),
    FAILD_SAVE_PATIENT(1003, "保存病人信息失败"),
    SYSTEM_ERROR(1004, "创建实体对象失败"),
    CHECK_PASS(200, "实体对象检查成功"),
    FAILD_SAVE_CONSULT(1005, "保存住院信息失败"),
    FAILD_SAVE_COURSE(1006, "保存随访信息失败"),
    PATIENT_NOT_EXISTS(1007, "病人不存在"),
    CONSULT_NOT_EXISTS(1008, "病人住院信息不存在"),
    COURSE_NOT_EXISTS(1009, "病人随访信息不存在"),
    INVALID_CURE_TYPE(1010, "无效的问诊类型"),
    FAILD_REMOVE_PATIENT(1011, "移除病人信息失败"),
    FAILED_IMPORT_PATIENT(1012, "导入病人信息失败"),
    FAILED_IMPORT_CONSULT(1013, "导入住院信息失败"),
    FAILED_IMPORT_COURSE(1014, "导入随访信息失败");

    private Integer status;

    private String message;

    /**
     * 返回REST接口的状态
     *
     * @return 状态编码
     */
    @Override
    public Integer getStatus() {
        return status;
    }

    /**
     * 返回状态码对应的描述信息
     *
     * @return 状态描述
     */
    @Override
    public String getMessage() {
        return message;
    }

    ErrorStatus(Integer status, String message) {
        this.status = status;
        this.message = message;
    }
}
